package top.tangyh.lamp.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum YzTypeEnum {

    /**
     * 诊疗
     */
    ZHENLIAO("1", "诊疗"),
    XIYAO("2", "西药"),
    CHNEGYAO("3", "成药"),
    CAOYAO("4", "草药"),
    DASHUYE("7", "大输液"),
    WENBEN("8", "文本"),
    JIANCHA("9", "检查"),
    JIANYAN("10", "检验"),
    XUEYE("11", "血液"),
    SHOUSHU("12", "手术"),
    HUIZHEN("13", "会诊"),
    HULI("14", "护理"),
    YINSHI("15", "饮食"),
    OTHER("16", "其他");

    private String typeCode;

    private String typeName;

    public static YzTypeEnum forValue(String typeCode) {
        for (YzTypeEnum value : values()) {
            if (typeCode.equals(value.getTypeCode())) {
                return value;
            }
        }
        return OTHER;
    }

}